package com.shop.service;

import com.shop.dao.CourseDao;
import com.shop.dao.OrderDao;
import com.shop.model.Course;
import com.shop.model.Student;

import java.util.List;

public class CourseService implements ICourseService{
    private CourseDao courseDao = new CourseDao();
    private OrderDao orderDao = new OrderDao();
    public List<Course> getCourse(){
        for (Course course : courseDao.getCourse()){
            System.out.println("CourseService:11:"+course.getCourseName());//调试
        }
        return courseDao.getCourse();
    }
    public List<Course> searchCourse(int courseId,String courseName){
        return courseDao.searchCourse(courseId, courseName);
    }
    public Course searchCourse1(String courseId){
        return courseDao.searchCourse1(courseId);
    }
    public Boolean updateCourseCapacity(List<String> courseIds, int courseCapacity){
        return courseDao.updateCourseCapacity(courseIds, courseCapacity);
    }

}
